package com.ruoyi.project.WebMoudle.ShopSuser.mapper;

import java.util.List;
import com.ruoyi.project.WebMoudle.ShopSuser.domain.ShopSuser;
import com.ruoyi.project.WebMoudle.ShopSuser.domain.ShopVo;
import org.apache.ibatis.annotations.Param;

/**
 * 商铺后台分配Mapper接口
 * 
 * @author ShopSuser
 * @date 2020-06-22
 */
public interface ShopSuserMapper 
{
    /**
     * 查询商铺后台分配
     * 
     * @param id 商铺后台分配ID
     * @return 商铺后台分配
     */
    public ShopSuser selectShopSuserById(Long id);

    /**
     * 查询商铺后台分配列表
     * 
     * @param shopSuser 商铺后台分配
     * @return 商铺后台分配集合
     */
    public List<ShopSuser> selectShopSuserList(ShopSuser shopSuser);

    /**
     * 新增商铺后台分配
     * 
     * @param shopSuser 商铺后台分配
     * @return 结果
     */
    public int insertShopSuser(ShopSuser shopSuser);

    /**
     * 修改商铺后台分配
     * 
     * @param shopSuser 商铺后台分配
     * @return 结果
     */
    public int updateShopSuser(ShopSuser shopSuser);

    /**
     * 删除商铺后台分配
     * 
     * @param id 商铺后台分配ID
     * @return 结果
     */
    public int deleteShopSuserById(Long id);

    /**
     * 批量删除商铺后台分配
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteShopSuserByIds(String[] ids);
    /*根据系统用户查询店铺*/
    ShopSuser selectOneShopId(Long sysUserId);
    /*根据微信用户查询店铺列表*/
    List<ShopVo> toShopListByWid(Long wxUserId);
    /*根据店铺id查询店铺*/
    List<ShopSuser> queryByShopId(Long shopId);
    /*根据微信用户和商铺id查询唯一的店铺数据*/
    ShopVo queryByWidAndSid(@Param("wxUserId") Long wxUserId,@Param("shopId") Long shopId);
    /*根据微信用户和商铺id查询唯一的关联*/
    ShopSuser selectEntityByWidAndSid(@Param("wxUserId") Long wxUserId,@Param("shopId") Long shopId);

    int queryEmpCount(Long shopId);

    List<String> queryShopWxEmp(Long shopId);
}
